/*
 * Copyright (c) 2021. Moses All Right Reserved
 */

package com.moses.design_patterns.bride;

/**
 * @author Moses
 * @email shenhuohui@gmail.com
 * @date 2021/4/17 10:41
 */
public class GrandSon extends Son {
    public GrandSon(Implementor implementor) {
        super(implementor);
    }

    @Override
    public void stableMethod1() {
        System.out.println("i will use transient method 1 in GrandSon");
        // 孙类中使用易变方法
        needTransientMethod1();
    }

    public void needTransientMethod1(){
        this.getImplementor().transientMethod1();
    }
}
